<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<title>订单信息</title>
<meta charset="UTF-8">
<meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">

<link href="{$Think.config.RESOURCEURL}wx_assets/css/product_list.css" rel="stylesheet">
<link href="{$Think.config.RESOURCEURL}wx_assets/css/product_templates.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{$Think.config.RESOURCEURL}wx_assets/css/card.css?v=20131217" media="all" />

<link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/employee_manage.css?_vr_=1389175823610" />

   <!-- ▲Common CSS -->
    
    <!-- ▼_global -->
    <script type="text/javascript">
    var _global = {"kdt_id":"2","user_id":0,"run_mode":"online","debug":false,"project":"default","online_debug":true,"js":{"js_compress":true,"message_report":true,"checkbrowser":true,"hide_wx_nav":true},"query_path":"\/showcase\/feature","module":"showcase","controller":"Showcase_Feature_Controller","action":"index","full_action":"getIndexHtml","method":"get","format":"html","page_size":760,"is_mobile":false,"isShopDomain":true,"mp_changed":false,"is_owner_team":false,"fans_id":0,"is_fans":2,"mp_id":"2","mp_data":{"mp_id":"2","kdt_id":"2","mp_weixin":"kdtnote","mp_nickname":"\u53e3\u888b\u901a\u6d88\u606f","mp_picture":"http:\/\/static.koudaitong.com\/assets\/img\/avatar\/2.jpg","is_display_footbar":"1"},"ajaxURL":{"isFans":"http:\/\/koudaitong.com\/v1\/api\/fans\/check?fans_mi=2"},"logURL":"http:\/\/tj.koudaitong.com\/1.gif","from_weibo":0,"url":{"base":"http:\/\/koudaitong.com","domain":"koudaitong.com","cp":"http:\/\/cp.koudaitong.com","pay":"http:\/\/pay.koudaitong.com","trade":"http:\/\/trade.koudaitong.com","api":"http:\/\/api.koudaitong.com","img":"http:\/\/img.koudaitong.com","static":"http:\/\/static.koudaitong.com\/v2","www":"http:\/\/koudaitong.com\/v2","v1":"http:\/\/koudaitong.com\/v1","short_url":"http:\/\/koudaitong.com","v1_static":"http:\/\/static.koudaitong.com\/v1","wap":"http:\/\/wap.koudaitong.com\/v2","imgqn":"http:\/\/imgqn.koudaitong.com","goods_search":"http:\/\/10.6.5.28:8899","callback_queue":"http:\/\/10.6.5.28:8899\/queue","log_url":"http:\/\/tj.koudaitong.com\/1.gif","cron":"http:\/\/10.6.5.28:1934\/","taobao_item":"http:\/\/item.taobao.com","scv":"http:\/\/scv.koudaitong.com","qrcode":"http:\/\/10.6.5.28:8080\/qr?","taobao_wap_item":"http:\/\/a.m.taobao.com"}};    _global.spm = {logType:"f",logId:"1012536"};
    </script>
    <!-- ▼Global & Libs -->
    <script type="text/javascript">
    (function(ua) {
        var ele = document.documentElement;
        if (ua.match(/micromessenger\/5/gi)) {
            ele.className = ele.className + ' mobile wx_mobile wx_mobile_5';
        } else if (ua.match(/micromessenger/gi)) {
            ele.className = ele.className + ' mobile wx_mobile';
        } else if (window._global.is_mobile) {
            ele.className = ele.className + ' mobile'
        }
    })(navigator.userAgent || navigator.vendor || window.opera)
    </script>
    <!-- ▲_global -->


<script src="{$Think.config.RESOURCEURL}wx_assets/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/alert.js"></script>
<script src="{$Think.config.RESOURCEURL}wx_assets/js/jquery-2.0.3.min.js"></script>
<script src="{$Think.config.RESOURCEURL}wx_assets/js/idangerous.swiper-2.4.1.min.js"></script>
<script src="{$Think.config.RESOURCEURL}wx_assets/js/wap.min.js?v=1389175823610"></script>
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/share_product.js?2014-01-05"></script>


</head>
<body>

	<div class="lay_page page_icenter" id="page_icenter">
		<div class="lay_page_wrap">
			<div id="itemList">
				<div id="normalList">
				
					<a href="javascript:void(0)">
					<div class="mod_cell qb_mb15">
						<div class="mod_celltitle">
			                <h3 class="qb_fl">订单信息</h3>
			            </div>
						<div class="mod_slider">
							<div class="slider_cnt">
								<ul>
									<!--
									<li class="single qb_mb10 qb_bfc bfc_f">
										<img
										src="{$result.picUrl}"
										class="bfc_f" width="80" height="80">
										  -->
										<div class="bfc_c">
											<i class="qb_fr  icon_arrow_right_single"></i>
											<p>订单编号：{$serialNumber}</p>
											<p>订单状态：
											<notempty name="status">
							                <if condition="$status eq 'ok'">[交易成功]
							                <elseif condition="$status eq 'closed'"/>[交易关闭]
							                <elseif condition="$status eq 'paying'"/>[等待付款]
							                <elseif condition="$status eq 'delivering'"/>[等待发货]
							                <elseif condition="$status eq 'deliveringtostore'"/>[等待配送到自提点]
							                <elseif condition="$status eq 'delivered'"/>[已发货]
							                <elseif condition="$status eq 'deliveredtostore'"/>[已配送到自提点]
							                <elseif condition="$status eq 'notsubmit'" />[未提交]
							                <elseif condition="$status eq 'refund'"/>[已退款]
							                <elseif condition="$status eq 'refundedpart'"/>[已部分退款]
							                <elseif condition="$status eq 'refunding'"/>[退款中]
							                <elseif condition="$status eq 'payingconfirm'"/>[付款确认中]
							                <else />[状态错误]
							                </if>
							                </notempty>
							                <empty name="status">[未处理]</empty>
							                </p>
							                
						                	<notempty name="price">
							                <p>支付金额：￥{$price}元
							                </p>
											</notempty>
											
											<notempty name="points">
											<p>支付积分：{$points}
							                <if condition="$payType eq interact">
							              		  互动积分
							                <elseif condition="$payType eq consume"/>消费积分
							                </if>
							                </p>
											</notempty>
											
											<if condition="$status neq 'notsubmit'">
												<p>下单时间：{$createTime}</p>
											<else /><p>提交时间：{$updateTime}</p>
											</if>
											
											<p>联    系  人:{$fullName}</p>
											<p>联系电话:{$phone}</p>
											<p>买家说明:{$remark}</p>
											<p>卖家说明:{$sellerRemark}</p>
										</div>
									<!-- 
									</li>
									 -->
									
								</ul>
							</div>
						</div>
					</div>
					</a>
					
					
				</div>
			</div>
			
			 <div class="mod_cell qb_gap">
            <div class="mod_celltitle">商品信息</div>
            <div class="ui_color_weak qb_mb10"></div>
            <ul class="mod_list">
            	<volist name="productList" id="order">
	            	<volist name="order.list" id="product">
			            <li class="list_item qb_mb10 qb_bfc">
			                <a onClick="onDetail({$product.id})">
			                    <div class="bfc_f">
			                        <img src="{$product.picUrl}" width="60" height="60" alt="">
			                    </div>
			                    <div class="bfc_c">
			                        <p>{$product.name}</p>
			                        <p class="qb_fs_s mod_color_weak"></p>
			                        <!-- 
			                        <p class="qb_fs_s mod_color_weak">数量：{$product.reserveCount} 单价：￥6.00元</p>
			                         -->
			                         <p class="qb_fs_s mod_color_weak">数量：{$product.reserveCount}</p>
			                    </div>
			                </a>
			            </li>
		            </volist>
	            </volist>
            </ul>
        </div>
		</div>
	
	
		<!--start  cardexplain -->
		<div class="cardexplain">
			<ul class="round">
				<form action="javascript:;" method="post">
				<li class="title mb"><span class="none">修改订单状态</span></li>
				
				<li class="nob">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
						<tbody>
							<tr>
								<th>状态</th>
								<if condition="$type eq 'order'">
									 <td><select name="ordertype" class="dropdown-select" id="ordertype">
											<option selected="" class="dropdown-option" value="">请选择类型</option>
											<option value="ok">交易成功</option>
											<option value="closed">交易关闭</option>
									</select></td>
							    <elseif condition="($type eq 'takeout') OR ($type eq 'buy') OR ($type eq 'point')"/>
							    	<td><select name="pointtype" class="dropdown-select" id="pointtype">
											<option selected="" class="dropdown-option" value="">请选择类型</option>
											<option value="delivered">已经发货</option>
											<option value="deliveredtostore">已配送到自提点</option>
											<option value="ok">交易成功</option>
											<option value="closed">交易关闭</option>
									</select></td>
				                <else />
				                	<td><select name="type" class="dropdown-select" id="type">
											<option selected="" class="dropdown-option" value="">无状态</option>
									</select></td>
				                </if>
							</tr>
						</tbody>
					</table>
				</li>
				<if condition="($type eq 'point' ) OR ($type eq 'buy' ) ">
				
				<li class="nob">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
						<tbody>
							<tr>
								<th>给买家说明
								</th>
								<td><input name="sellerRemark"  type="text"  min="0"
									class="px" value="" id="sellerRemark" placeholder="请输入说明信息"></td>
							</tr>
						</tbody>
					</table>
				</li>
				
				<li class="nob">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="kuang">
						<tbody>
							<tr>
								<th valign="top" class="thtop">卖家备注
								</th>
								<td>
									<textarea name="sellerNote" type="text"
										class="pxtextarea" style="height: 57px; overflow-y: visible"
										id="sellerNote" placeholder="请输入备注信息">
									</textarea>
								</td>
							</tr>
						</tbody>
					</table>
				</li>
				</if>
				
			</form>
			</ul>
			
			<div class="footReturn">
				<input type="button" id="showcard" class="submit" value="提  交" />
				<div class="window" id="windowcenter">
					<div id="title" class="wtitle">
						提交<span class="close" id="alertclose"></span>
					</div>
					<div class="content">
						<div id="txt"></div>
					</div>
				</div>
			</div>
			<div style="height:20px"></div>
		</div>
		<!--end  cardexplain -->
	</div>

	
	<div class="bottomcontent js-mini-height">
	<div class="shopnav js-navmenu nav-on-bottom style-2">
        <div class="nav-menu has-menu-2">
			<div class="one">
            	<a class="mainmenu js-mainmenu" onclick="searchSystem('verifyCode')" >
					<i class="arrow-weixin"></i>
                    	验证码
            	</a>
            </div>
            
            <div class="divide">&nbsp;</div>
        
                
            <div class="one">
           		<a class="mainmenu js-mainmenu" onclick="searchSystem('order')">
                   	<i class="arrow-weixin"></i>
                               	订单
                </a>
                 
            </div>

            </div>
		</div>            
	</div>
	
	<div class="qb_quick_tip qb_none" id="bubble"></div>


<script>
var hrefParamsArray = GetSessionIdFromHref(window.location.search);

function GetSessionIdFromHref(search){
　　	var args = search.substring(1); 
　　	var retval = new Array(); 
	args = args.split("&"); 
		for(var i = 0; i < args.length; i ++){ 
			str = args[i]; 
			var arg = str.split("="); 
			if(arg.length <= 1) continue; 
			
			if(arg[0] == 'params') {
				var params = decodeURIComponent(arg[1]);
				var obj = eval('(' + params + ')');
				if (obj.euid != undefined) {
					retval["euid"] = obj.euid;
				}
				if (obj.euname != undefined) {
					retval["euname"] = obj.euname;
				}
			} else if(arg[0] == 'customerId') {
				retval["customerId"] = arg[1]; 
			}else if(arg[0] == 'userName'){
				retval["userName"] = arg[1]; 
			}
		} 
		if (retval["start"] == undefined) {
			retval["start"] = 0;
		}
		return retval; 
}

</script>

<script type="text/javascript">
var userName="{$userName}";
$(document).ready(function () {
    $("#showcard").click(function () {
    	
    	var baseUrl =  '{$Think.config.SERVER_HOST}';
    	var urlString = baseUrl + 'call.json?customerId={$customerId}';
    	var type ='{$type}';
    	
    	var sellerNote =$("#sellerNote").val();
    	var sellerRemark = $("#sellerRemark").val();
    	
    	
    	var status='';
    	
    	if(type == 'order'){
    		status = $("#ordertype").val();
    	}else if(type == 'takeout'){
    		status = $("#pointtype").val();
    		
    	}else if(type == 'buy'){
    		status = $("#pointtype").val();
    		
    	}else if(type == 'point'){
    		status = $("#pointtype").val();
    	}else{
    		status= '';
    	}
    	
    	if(sellerNote == '' && sellerRemark == '' && status == ''){
    		alert('请填写订单修改信息');
    		return;
    	}
    	
    	
       	$("#showcard").val("提交中...");
		$("#showcard").attr("disabled", true);
		var euid = hrefParamsArray["euid"];
		var euname = hrefParamsArray["euname"];
		//var type = hrefParamsArray["type"];
		var oid = '{$id}';
		
    	$.ajax({url : urlString,
    				dataType : "json",
    				type : "post",
    				timeout:15000,
    				data : {
    					'module': 'employeeManage',
    			        'method' : 'updateOrderTip',
    			        'userName':userName,
    			        'params' : '{"euid":"' + euid + '","euname":"' + euname +  '","sellerNote":"' + sellerNote
    			        	+'","sellerRemark":"'+sellerRemark+'","status":"'+status+'","oid":'+oid+'}',
    				},
    				success : function(data) {
    					
    					
    					if (data.code != undefined && data.code != 0 ) {
    						alert(data.msg);
    						$("#showcard").val("提    交");
    						$("#showcard").attr("disabled", false);
    						return;
    					}else{
    						alert("提交成功");
    						$("#showcard").val("提交成功");
    						$("#showcard").attr("disabled", true);
    						window.setTimeout("goBack()",1000);
    						
    						//window.setTimeout(" searchSystem("+type+")",1000);
    					}
    				},
    				error: function(jqXHR, textStatus, errorThrown){
    					alert('发送超时,可能存在网络异常,检查后请重试...');
 						$("#showcard").val("提    交");
 						$("#showcard").attr("disabled", false);
 						
    			     }
    		});
    	
    });
});

function goBack(){
	window.history.go(-1);
	//window.history.go(0) ;
}

function searchSystem(type) {
	
	var euid = hrefParamsArray['euid'] ;
	var euname = hrefParamsArray['euname'] ;
	window.location.href = 'call.html?&customerId={$customerId}&module=employeeManage&method=searchSystem'
		+ '&params={"euid":' + euid +',"euname":"'+ euname + '","type":"'+type+'"}';
}
</script>
</body>
</html>